package com.tcts;

import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.HttpWebConnection;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

public class test {
	private static HttpWebConnection httpwebconnection;
    private static WebClient client; 
	private static HtmlPage page; 
	/**
	 * @param args
	 */
	public static void main(String[] args)throws Exception{
		String s = "BMP PCX TIFF GIF JPEG TGA EXIF FPX SVG PSD CDR PCD DXF UFO EPS AI PNG HDRI RAW ";
		System.out.println(s.toLowerCase());
//		System.out.println(((HtmlPage)(client.getPage("http://www.tctsthrough.com"))).asXml());
//		openURLlinux("http://www.baidu.com");
	}
	 
	public static String getPageContent(String url)throws Exception{ 
		client = new WebClient(BrowserVersion.CHROME_16);
		httpwebconnection = new HttpWebConnection(client);
		client.setWebConnection(httpwebconnection);
		client.getOptions().setThrowExceptionOnFailingStatusCode(false); 
		client.getOptions().setCssEnabled(false);
		client.getOptions().setPopupBlockerEnabled(true);
		client.getOptions().setJavaScriptEnabled(false);
		page = (HtmlPage)client.getPage(url);
		return page.asXml();
	}
}
